package com.study.test.clone;

public class Client {
    public static void main(String[] args) {
        Monkey monkey = new Monkey("aa", 1);
        try {
            Monkey monkey2 = monkey.clone();
            monkey.setAge(2);
            if (monkey.equals(monkey2)) {
                System.out.println("true");
            } else {
                System.out.println("false");
            }
            System.out.println(monkey);
            System.out.println(monkey2);

        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
    }
}
